import { Injectable } from '@angular/core';
import {User} from "./user/model/user-model";

@Injectable()
export class GlobalService {

  public loginInfo:boolean;
  public problemSetCode:string;
  //后台访问api需要根据发布地址进行修改
  public api:string = "http://localhost:12002";

  constructor(
  ) { }

  public getCurrentUser():User{
      return JSON.parse(localStorage.getItem('currentUser'));
  }

  public setCurrentUser(currentUser){
    localStorage.setItem("currentUser",currentUser);
  }


}
